import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Chrome()
driver.maximize_window()
driver.get("https://www.baidu.com")
time.sleep(2)
#组合定位，标签名是input，class属性值是s_ipt。 如果是id定位，就可以写为: input#kw
driver.find_element(By.CSS_SELECTOR,'input.s_ipt').send_keys('从入门到放弃')
time.sleep(4)
driver.quit()
